.resource-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 320px;
  max-width: 90vw;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 999999;
  font-family: Arial, sans-serif;
  overflow-x: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

.panel-header h3 {
  margin: 0;
  padding: 5px;
  font-size: 16px;
  color: #333;
}

.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 5px;
}

.close-btn:hover {
  color: #333;
}

.panel-content {
  max-height: 600px;
  overflow-y: auto;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  background: #f8f8f8;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #666;
}

.tab-btn.active {
  color: #1a73e8;
  border-bottom: 2px solid #1a73e8;
}

.tab-content {
  display: none;
  padding: 16px;
}

.tab-content.active {
  display: block;
}

.resource-list {
  display: grid;
  gap: 12px;
}

.resource-item {
  display: flex;
  align-items: center;
  padding: 8px;
  border: 1px solid #eee;
  border-radius: 4px;
}

.resource-preview {
  width: 60px;
  height: 60px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  border-radius: 4px;
}

.resource-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.video-icon,
.audio-icon {
  font-size: 24px;
}

.resource-info {
  flex: 1;
  min-width: 0;
}

.resource-name {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
  word-wrap: break-word;
  word-break: break-all;
}

.resource-size {
  font-size: 12px;
  color: #666;
}

.download-btn {
  padding: 6px 12px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.download-btn:hover {
  background: #1557b0;
}

.trigger-btn {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: #1a73e8;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px 0 0 4px;
  cursor: pointer;
  z-index: 999998;
}

.trigger-btn:hover {
  background: #1557b0;
}

.empty-message {
  text-align: center;
  color: #666;
  padding: 20px;
  font-size: 14px;
}

.custom-context-menu {
  position: fixed;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000000;
}

.menu-option {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.menu-option:hover {
  background: #f8f8f8;
}